SOAddrInfo


C Specification

#include <dolphin/socket.h>
  
typedef struct SOAddrInfo   SOAddrInfo;
struct SOAddrInfo
{
    int             flags;         // input flags
    int             family;        // address family of socket
    int             sockType;      // socket type
    int             protocol;      // protocol of socket
    unsigned        addrLen;       // length of socket address
    char*           canonName;     // canonical name of service location
    void*           addr;          // socket address of socket
    SOAddrInfo*     next;          // pointer to next in list
};

// SOAddrInfo{}.flags
#define SO_AI_PASSIVE       0x01
#define SO_AI_CANONNAME     0x02
#define SO_AI_NUMERICHOST   0x04
#define SO_AI_NUMERICSERV   0x08

Description

SOAddrInfo structure is used to specify the hint for SOGetAddrInfo() and to retrieve the result of the function.

flags Hints for SOGetAddrInfo(). Zero or the bitwise OR of the following values:
 
SO_AI_PASSIVE Set to receive a socket address structure for use with SOBind(). Don't set to  receive a socket address structure for use with SOConnect().
SO_AI_CANONNAME Attempts to obtain the canonical name.
SO_AI_NUMERICHOST Specifies a numeric host address string.
SO_AI_NUMERICSERV Specifies a numeric port number string.
family Address family for use with SOSocket().
sockType Socket type for use with SOSocket().
protocol Protocol for use with SOSocket().
canonName If SO_AI_CANONNAME is requested, the canonical name is returned in the first SOAddrInfo structure.
addr Pointer to a socket address structure for use with SOConnect() or SOBind().
next Pointer to the next structure on the list, or NULL if it is the last element on the list.

See Also

SOGetAddrInfo(), SOFreeAddrInfo()